# python3 使用 requests 上传文件例程
import requests
from _sha1 import sha1

url = "http://localhost:8080/cgi-bin/upload.py"
files = {'uploadfile': ('google.crx', open("/home/ufhz/下载/google.crx", "rb"))
        }  
sha = sha1('google.crx'.encode('utf8')).hexdigest()        
data = {'sha':sha }

r = requests.post(url, files=files, data = None)
print(r.text)
